An Analytic Framework for JavaScript

نویسندگان

  • David Van Horn
  • Matthew Might
چکیده

As the programming language of the web, JavaScript deserves a principled yet robust framework for static analysis. To achieve both aims simultaneously, we start from an established reduction semantics for JavaScript and systematically derive its intensional abstract interpretation. Our first step is to transform the semantics into an equivalent low-level abstract machine: the JavaScript Abstract Machine (JAM). We then derive the systematic abstraction of the entire low-level machine. That process yields a finitestate, machine-based abstract interpretation for JavaScript. The calculation of this analysis is itself a milestone, constituting the first “field validation” of the theory behind systematically abstracting abstract machines. This finite-state framework allows us to import important techniques from the over 30 years of work on higher-order program analysis. We can instantiate the abstraction to obtain traditional analyses, such as k-CFA and CPA, extended to JavaScript. Not content with the precision of this analysis over complex control effects, we extend our systematic approach with a new mode: unbounded abstraction of continuations. This new mode yields an infinite-state yet decidable pushdown machine whose stack precisely models the structure of the concrete program stack. The precise model of stack structure in turn confers precise control-flow analysis over control effects, such as exceptions, finally blocks, and of course, calls and returns. Both the finite-state and pushdown frameworks for abstract interpretation are sound and computable.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

JavaScript: Bringing Object-Level Security to the Browser

JavaScript has evolved from a simple language intended to give web browsers basic interaction into a fully featured dynamic language that allows the browser to become an application delivery platform. With innovations such as asynchronous JavaScript and XML (AJAX) and JavaScript Object Notation (JSON), JavaScript has become the de facto standard for creating interactive web applications. With i...

متن کامل

Introducing a New JavaScript Framework for Professional Online Studies

New possibilities such as online crowdsourcing (Amazon Mechanical Turk), open data repositories (Open Science Framework), and online analysis (Ipython notebook) offer rich possibilities to improve, validate, and speed up research. However, until today there is no cross-platform integration of these subsystems. Furthermore, implementation of online studies still suffers from the complex implemen...

متن کامل

SAFE: Formal Specification and Implementation of a Scalable Analysis Framework for ECMAScript

The prevalent uses of JavaScript in web programming have revealed security vulnerability issues of JavaScript applications, which emphasizes the need for JavaScript analyzers to detect such issues. Recently, researchers have proposed several analyzers of JavaScript programs and some web service companies have developed various JavaScript engines. However, unfortunately, most of the tools are no...

متن کامل

Performance and Resource Analysis on the JavaScript Runtime for IoT Devices

The light-weight JavaScript frameworks such as IoT.js, DukServer, and Smart.js provide the asynchronous event-driven JavaScript runtime for lowend IoT device. These frameworks are designed for memory-constrained systems such as IoT devices. To evaluate the performance of these frameworks, existing JavaScript benchmarks are not suitable considering that the use cases of IoT device are mainly to ...

متن کامل

Making Sense Out of a Jungle of JavaScript Frameworks - Towards a Practitioner-Friendly Comparative Analysis

The field of Web development is entering the HTML5 and CSS3 era and JavaScript is becoming increasingly influential. A large number of JavaScript frameworks have been recently promoted. Practitioners applying the latest technologies need to choose a suitable JavaScript framework (JSF) in order to abstract the frustrating and complicated coding steps and to provide a cross-browser compatibility....

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • CoRR

دوره abs/1109.4467  شماره 

صفحات  -

تاریخ انتشار 2011